package com.longchat.repository;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import com.longchat.domain.permission.SysUser;
import com.longchat.dto.comm.DatatablesPageViewInfo;
import com.longchat.dto.system.SysUserQueryInfo;

public interface SysUserJpaRepository extends JpaRepository<SysUser, Integer> {

	@Query("select u from SysUser u where u.userName = ?1 and u.password=?2")
	SysUser findByUserNameAndPassword(String userName,String password);
	
	@Query("select u from SysUser u where u.userName = ?1")
	SysUser findByUserName(String userName);

}
